package com.hengpeng.itfinoss.controller.dataView;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.hengpeng.common.exception.ServiceResult;
import com.hengpeng.itfinoss.controller.BaseController;
import com.hengpeng.itfinoss.service.ServiceFactory;

@Controller
@RequestMapping("/statistics")
public class DataViewController extends BaseController {
    @Autowired
    private ServiceFactory serviceFactory;

    @RequestMapping(value = "/dateView", method = RequestMethod.GET)
    public String dataView(ModelMap map, HttpServletRequest request) {
        ServiceResult<Map<String, String>> serviceResult = serviceFactory.getBorrowInfoService().getBorrowInfoView();
        map.put("dataResult", serviceResult.getReturnValue());
        return "statisticsData/tradeData";
    }

}
